import { baseUrl } from '@/libs/baseUrl.js'


// 查询个人资料的Api
export const selectCardUserApi = (userId)=>{
	return uni.request({
		url:baseUrl + '/cardUser/select',
		data:{
			userId:userId
		}
	})
}

// 创建个人资料的Api
export const addCardUserApi = (data)=>{
	return uni.request({
		url: baseUrl + '/cardUser/add',
		data:data
	})
}

// 修改个人资料的Api
export const editCardUserApi = (data)=>{
	return uni.request({
		url:baseUrl + '/cardUser/edit',
		data:data
	})
}


// 查询企业资料的Api
export const selectCardCompanyApi = (userId)=>{
	return uni.request({
		url:baseUrl + '/cardCompany/select',
		data:{
			userId:userId
		}
	})
}

// 创建企业资料的Api
export const addCardCompanyApi = (data)=>{
	return uni.request({
		url:baseUrl + '/cardCompany/add',
		method:"POST",
		 header: {
		        'Content-Type': 'application/json' // 设置请求的Content-Type
		 },
		data:data
	})
}

// 修改企业资料的Api
export const editCardCompanyApi = (data)=>{
	return uni.request({
		url:baseUrl + '/cardCompany/edit',
		method:"POST",
		 header: {
		        'Content-Type': 'application/json' // 设置请求的Content-Type
		 },
		data:data
	})
}

// 收藏名片的Api
export const collectCardApi = (data) =>{
	return uni.request({
		url:baseUrl + '/user/collectCard',
		data:data
	})
}

// 查看名片详情的Api
export const selectCardDetailApi = (userId)=>{
	return uni.request({
		url:baseUrl + '/user/selectCard',
		data:{
			userId:userId
		}
	})
}


// 查看收藏列表的Api
export const selectMyCollectListApi = (userId)=>{
	return uni.request({
		url:baseUrl + '/user/selectMyCollect',
		data:{
			userId:userId
		}
	})
}


// 取消收藏的Api
export const secureCollectCardApi = (collectId) =>{
	return uni.request({
		url: baseUrl + '/user/secureCollectCard',
		data:{
			collectId:collectId
		}
	})
}